package com.plan.dao.mapper.card;

import com.plan.controller.card.request.CompleteAllReq;
import com.plan.controller.card.request.DayPlanListReq;
import com.plan.controller.card.response.DayPlanListRes;
import com.plan.entity.card.DayPlan;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface DayPlanMapper {

    int insert(DayPlan plan);

    int batchInsert(List<DayPlan> dayPlanList);

    int update(DayPlan update);

    int deleteByPk(@Param("dayPlanId") Long dayPlanId);

    int deleteAll(@Param("teamId") Long teamId, @Param("cardId") Long cardId);

    DayPlan getOneById(@Param("id") Long id);

    List<DayPlanListRes> getList(DayPlanListReq req);

    int getCount(@Param("teamId") Long teamId, @Param("cardId") Long cardId, @Param("yearMonthDay") int yearMonthDay);

    void delete(@Param("teamId") Long teamId, @Param("cardId") Long cardId, @Param("dayList") List<Integer> dayList);

    void realDelete(@Param("teamId") Long teamId, @Param("cardId") Long cardId, @Param("dayList") List<Integer> dayList);

    int completeForIdList(CompleteAllReq req);

    int realDeleteByCardId(@Param("teamId") Long teamId, @Param("cardId") Long cardId);
}
